
function! plugin#gvimfullscreen#load() abort
    if !exists("g:loaded_gvimfullscreen")
        packadd gvimfullscreen
        call gvimfullscreen#init()
    endif
    return filereadable(g:gvimfullscreen_lib_path)
endfunction

function! plugin#gvimfullscreen#toggle() abort
    pyx import fullscreen
    pyx from importlib import reload
    pyx reload(fullscreen)
    pyx fullscreen.toggle()
endfunction

function! plugin#gvimfullscreen#init() abort
    if plugin#gvimfullscreen#load() && health#check_python3()
        noremap <Plug>(toggle-fullscreen) :call plugin#gvimfullscreen#toggle()<cr>
        "Alt+Enter
        map <m-s-cr> <Plug>(toggle-fullscreen)
        "Shift+Y
        nmap <m-+> <Plug>(vim-increase-alpha)
        "Shift+T
        nmap <m-_> <Plug>(vim-decrease-alpha) 
        "Shift+R
        " nmap <m-r> <Plug>(toggle-top-most)
    endif
endfunction

